% demoDots.m
%
% demo random dots using DotsX code
%
% shows 4 dots fields with various behaviors
%

% Copyright 2004 by Joshua I. Gold
%   University of Pennsylvania

try
    % change priority (using Priority(<value0-9>)) to change
    %   the priority of the process and speed things up
    rInit('remote');



%     rAdd('dXdots', 4, 'visible', true, 'direction', {0.00, 90, 0, 90},...
%         'density', 20, ...
%         'speed', 3, 'diameter', 15, 'color', {1 1 1 2},...
%         'coherence', {4.3 4.3 4.3 4.3}, ...
%         'x', {-7 -7 7 7}, ...
%         'y', {-7 -7 7 7}, ...
%         'lifetimeMode', 'limit', ...
%         'flickerMode',  'random', ...
%         'wrapMode',     'wrap');

    rAdd('dXdots', 1, 'visible', true, 'direction', 90,...
        'density', 20, ...
        'speed', 4, 'diameter', 7, 'color', 1,...
        'coherence', 90, ...
        'x', 0, ...
        'y', -7, ...
        'lifetimeMode', 'limit', ...
        'flickerMode',  'random', ...
        'wrapMode',     'wrap');

    rGraphicsDraw(inf);
    rGraphicsBlank;
    rDone;
catch
    e = lasterror
    rDone;
end
